<template>
  <van-grid :column-num="4">
      <van-grid-item v-for="(n, index) in goods_icons" :key="index"  :to="'/list' + n.txt">
        <img :src="n.imageurl" alt="" />
        <div>{{ n.goods_txt }}</div>
      </van-grid-item>
    </van-grid>
</template>

<script>
export default {
data() {
    return {
        goods_icons: [
        {
          imageurl: require("@/assets/goods_icon_2.png"),
          goods_txt: "居家生活",
          txt:1
        },
        {
          imageurl: require("@/assets/goods_icon_3.png"),
          goods_txt: "服饰鞋包",
          txt:2
        },
        {
          imageurl: require("@/assets/goods_icon_4.png"),
          goods_txt: "美食酒水",
          txt:3
        },
        {
          imageurl: require("@/assets/goods_icon_5.png"),
          goods_txt: "个护清洁",
          txt:4

        },
        {
          imageurl: require("@/assets/goods_icon_6.png"),
          goods_txt: "母婴亲子",
          txt:5

        },
        {
          imageurl: require("@/assets/goods_icon_7.png"),
          goods_txt: "运动旅行",
          txt:6
          
        },
        {
          imageurl: require("@/assets/goods_icon_8.png"),
          goods_txt: "数码家电",
          txt:7

        },
        {
          imageurl: require("@/assets/goods_icon_9.png"),
          goods_txt: "宠物生活",
          txt:8

        },
      ],
    }
},
}
</script>

<style>

</style>